home *** CD-ROM | disk | FTP | other *** search
- type country = string[36];
- cptr = ^country;
-
- var countries : array[1..500] of cptr;
- i,CountryNbr : integer;
- CountryFile : text;
-
- {$F+}
- FUNCTION CountryPicker(var n: integer): string;
- begin
- CountryPicker := countries[n]^;
- end;
- {$F-}
-
- procedure NewCountry;
- var tmpptr : cptr;
- begin
- inc(CountryNbr);
- New(tmpptr);
- countries[CountryNbr] := tmpptr;
- end;
-
- procedure InitCountries;
- begin
- CountryNbr := 0;
- assign(CountryFile,'country.lst');
- reset(CountryFile);
- while NOT Eof(CountryFile) do
- begin
- NewCountry;
- readln(CountryFile,countries[CountryNbr]^);
- end;
- close(CountryFile);
- end;
-
- procedure CountryList;
- var i: integer;
- begin
- Set_PickWindow_To(21,2,58,22,2,'List of Countries');
- i := PickList ( @CountryPicker, 1, CountryNbr, 1);
- end;